//
//  ViewController.h
//  myhuibao
//
//  Created by lijun on 13-2-4.
//  Copyright (c) 2013年 myhuibao. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MessageUI/MFMessageComposeViewController.h>
#import "RestaurantView.h"
#import "CommentView.h"
#import "MapView.h"
#import "ASIHTTPRequest.h"
#import "ASIFormDataRequest.h"
#import "RequestLoadingView.h"

@interface MKMapView (ZoomLevel)

- (void)setCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate
                  zoomLevel:(NSUInteger)zoomLevel
                   animated:(BOOL)animated;

@end
@interface RestaurantDetailViewController : UIViewController<UIScrollViewDelegate,UITableViewDelegate,UITableViewDataSource,MFMessageComposeViewControllerDelegate,MKMapViewDelegate>{
    //左右滑动部分
	UIPageControl *pageControl;
    int currentPage;
    BOOL pageControlUsed;
    RestaurantView *view1;
    CommentView *view2;
    MapView *view3;
    NSMutableArray *tableDataArray;
    NSMutableArray *tableDataArrayDish;
    NSDictionary *merchant;
    bool isSearchFinished;
    bool isCommentFinished;
    bool isSearchMoreFinished;
    bool isDishFinish;
    ASIHTTPRequest *reqSearch;
    ASIHTTPRequest *reqComment;
    ASIHTTPRequest *reqSearchMore;
    ASIHTTPRequest *reqDish;
    int pageIndex;
    int returnCount;
    int iDishCount;
    UIWebView *phoneCallWebView;
    NSMutableDictionary *dicImage;
    int settingID;
    
    RequestLoadingView *loadingView;

}
- (void) getMerchant:(int) merchantId;
- (void) getDish:(int) merchantId;
- (void) addBasicView;

//左右滑动相关
- (void)initScrollView;
- (void)scrollViewDidScroll:(UIScrollView *)scrollView;
- (void)createAllEmptyPagesForScrollView;

//界面按钮事件
- (void) btnActionShow;
- (void) btnRestaurantAction;
- (void) btnRemarkAction;
- (void) btnMapAction;
- (IBAction)doShareSMS:(id)sender;
- (IBAction)doAddFavorite:(id)sender;
- (IBAction)doBook:(id)sender;

- (IBAction)doBack:(id)sender;
@property (strong, nonatomic) IBOutlet UIButton *btnRestaurant;
@property (strong, nonatomic) IBOutlet UIButton *btnRemark;
@property (strong, nonatomic) IBOutlet UIButton *btnMap;
@property (strong, nonatomic) IBOutlet UIScrollView *svMain;
@property (strong, nonatomic) IBOutlet UILabel *sliderLabel;
@property (assign) int merchantId;
@property (assign) int merchantType;
@property (strong, nonatomic) IBOutlet UIButton *btBack;
@property (strong, nonatomic) IBOutlet UILabel *lbAvgConsume;
@property (strong, nonatomic) IBOutlet UILabel *lbTitle;
@property (strong,nonatomic) NSString *distance;
@property (strong, nonatomic) IBOutlet UIButton *btnBook;
@property (strong, nonatomic) IBOutlet UIView *titleView;

- (void)startRequest;

@end
